

class Vehicle{
    private int wheels;
    private double weight;
    public Vehicle(){

    }
    public Vehicle(int wheels, double weight){
        this.wheels=wheels;
        this.weight=weight;

    }

    public int getWheels() {
        return wheels;
    }

    public void setWheels(int wheels) {
        this.wheels = wheels;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Vehicle{" +
                "wheels=" + wheels +
                ", weight=" + weight +
                '}';
    }
}
class Car extends Vehicle{
    private int loader;

    public Car(int wheels, double weight,int loader){
        super(wheels,weight);
        this.loader=loader;

    }

    @Override
    public String toString() {
        return "Car{" +
                "loader=" + loader +",wheels="+getWheels()+",weight="+getWeight()+
                '}';
    }

}
class Truck extends Vehicle{
    private double payload;
    public Truck(int wheels, double weight,double payload){
        super(wheels,weight);
        this.payload=payload;
    }

    @Override
    public String toString() {
        return "Truck{" +
                "payload=" + payload +",wheels="+getWheels()+",weight="+getWeight()+
                '}';
    }
}
public class Test {
    public static void main(String[] args) {
        Vehicle vehicle = new Vehicle(33,33);
        System.out.println(vehicle);
        Car car = new Car(4,344,33);
        System.out.println(car);
        Truck truck = new Truck(13,23,4);
        System.out.println(truck);
    }


}
